package cn.day07;

public class TestTeacher {
    public static void main(String[] args) {
        Teacher t=new Teacher();
        t.setName("鲁智深");
        System.out.println(t.getName());

        Teacher t2=new Teacher("李逵","壮汉",28,300);
        System.out.println(t2.getName()+t2.getGender()+t2.getAge()+t2.getSalary());


    }

}
class Teacher{
    private String name;
    private String gender;
    private int age;
    private double salary;

    public Teacher(){
        System.out.println("我是无参构造");
    }

    public Teacher(String name, String gender, int age, double salary) {
        this.name = name;
        this.gender = gender;
        this.age = age;
        this.salary = salary;
        System.out.println("我是全参构造");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }
}